<?php

namespace support\Service;

use support\Backend\BackendService;
use support\Container;
use support\Model\LevelModel;

class LevelService extends BackendService
{
    public function __construct()
    {
        $this->model = Container::get(LevelModel::class);
    }

    /**
     * 获取职级列表
     * @return array
     * @since 2025/01/07
     */
    public function getLevelList(): array
    {
        $list = $this->model->where([
            ['status', '=', 1],
            ['mark', '=', 1],
        ])->orderBy("sort", "asc")->get();
        return $list ? $list->toArray() : [];
    }

}